The objective of this task was to discover open ports on devices in a local network to understand network exposure using Nmap on Kali Linux.
- Nmap: A powerful network scanning tool for discovering hosts and services.
- Kali Linux: A Linux distribution designed for cybersecurity tasks.
First, the network interfaces of the Kali Linux virtual machine were checked using the ip command. The relevant details:
- IP Address:
192.168.247.140 - Interfaces:
lo(Loopback):127.0.0.1/8eth0:192.168.247.140/24docker0:172.17.0.1/16(currently down)
- Command:
nmap -sS 192.168.247.140 - Result: Only port
22/tcp(SSH) was found open.
- Command:
nmap -sS 192.168.247.0/24 - Results:
192.168.247.1: Ports135/tcp(msrpc),139/tcp(netbios-ssn),445/tcp(microsoft-ds),3306/tcp(mysql) open.192.168.247.2: Port53/tcp(domain) open.192.168.247.254: All ports filtered.192.168.247.140: Port22/tcp(SSH) open.
- Command:
nmap -sT 192.168.247.140 - Result: Only port
22/tcp(SSH) was found open.
- Command:
sudo nmap -p- -sS -T4 192.168.247.140 - Result: Ports
22/tcp(SSH) and1716/tcp(XMSG) were found open.
- Purpose: Secure remote administration.
- Risks:
- Brute-force attacks targeting weak credentials.
- Vulnerabilities in outdated SSH versions (e.g., CVE-2023-38408).
- Privilege escalation if default/weak credentials are used.
- MITM attacks if encryption is misconfigured.
- Mitigation:
- Use key-based authentication.
- Change the default port or restrict access to trusted IPs.
- Enable
fail2banto block brute-force attempts.
- Purpose: Typically associated with messaging services or network analysis tools like Xplico.
- Risks:
- Potential backdoor or malware communication channel.
- Data leakage if the service handles sensitive data without encryption.
- Exploitable vulnerabilities (e.g., RCE, DoS) in outdated software.
- Mitigation:
- Verify the service running on this port.
- Disable the service if unnecessary.
- Monitor for suspicious traffic.
The scans revealed two open ports on the local machine (192.168.247.140):
- SSH (Port 22): Essential for remote management but requires hardening.
- XMSG (Port 1716): Non-standard port that needs further investigation to ensure it is not a security risk.
The subnet scan also identified other devices with open ports, highlighting the importance of securing all networked devices to reduce attack surfaces.
Task 1.pdf: Detailed scan report and analysis.README.md: Summary of the task (this file).